package com.menggudf.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="imgUrl")
public class ImgUrl implements Serializable{

    /**
     * 
     */
    private static final long serialVersionUID = 4286242709423035052L;

    private int id;
    private String url;
    private CaseHistory caseHistory;
    
    @Id
    @Column(name="id",unique=true,nullable=false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    
    @Column(name="url")
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "imgid", nullable = false)
    public CaseHistory getCaseHistory() {
        return caseHistory;
    }
    public void setCaseHistory(CaseHistory caseHistory) {
        this.caseHistory = caseHistory;
    }
    
}
